package com.duobaoyu.dby.supply.admin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.duobaoyu.dby.supply.common.biz.dto.refund.AfterSaleApplyQueryDTO;
import com.duobaoyu.dby.supply.common.biz.dto.refund.AfterSaleChannelAddressDTO;
import com.duobaoyu.dby.supply.common.biz.dto.refund.AfterSaleFixDTO;
import com.duobaoyu.dby.supply.common.biz.dto.refund.AfterSaleUpdateDTO;
import com.duobaoyu.dby.supply.common.biz.vo.refund.AfterSaleListVO;
import com.duobaoyu.dby.supply.common.biz.vo.refund.AfterSaleVO;
import com.duobaoyu.dby.supply.common.biz.vo.refund.ReasonVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by shuming on 2023/10/9 10:05
 */
public interface AdminAfterSaleBizService {

    /**
     * 售后列表查询
     *
     * @param afterSaleApplyQuery
     * @return
     */
    Page<AfterSaleListVO> queryPage(AfterSaleApplyQueryDTO afterSaleApplyQuery);

    /**
     * 售后详情
     *
     * @param afterSaleSn
     * @return
     */
    AfterSaleVO afterSaleDetail(String afterSaleSn);

    /**
     * 同意售后
     *
     * @param address
     * @return
     */
    Boolean agreeAfterSale(AfterSaleChannelAddressDTO address);

    /**
     * 拒绝售后
     *
     * @param afterSaleSn
     * @param rejectReason
     * @return
     */
    Boolean rejectAfterSale(String afterSaleSn, String rejectReason);

    /**
     * 渠道重新提交
     *
     * @param afterSaleUpdate
     * @return
     */
    Boolean modifyAfterSale(AfterSaleUpdateDTO afterSaleUpdate);

    /**
     * 同意退款
     *
     * @param afterSaleSn
     * @param refundAmount
     * @param refundFreightAmount
     * @return
     */
    Boolean agreeRefund(String afterSaleSn, BigDecimal refundAmount, BigDecimal refundFreightAmount);

    /**
     * 售后数据导出
     *
     * @param afterSaleApplyQuery
     * @return
     */
    Boolean afterSaleExport(AfterSaleApplyQueryDTO afterSaleApplyQuery);

    /**
     * 售后原因查询
     *
     * @param afterSaleSn
     * @return
     */
    List<ReasonVO> queryAfterSaleAttributes(String afterSaleSn);

    /**
     * 售后数据订正
     *
     * @param dto
     * @return
     */
    Boolean fixData(AfterSaleFixDTO afterSaleFix);


    Long waitReview();
}
